package com.label.Model.Vo;

import com.label.Utils.Common.InfoUtil;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

@Data
public class UserBaseInfo {

    private String userid;

    private String username;

    private String classid;

    private String enrollyear;

    private String majorid;

    private String sex;

    private String nativeprovince;

    private String nativecity;

    private String nation;

    private String politics;

    private String classposition;

    private String unionposition;


    public String getClassName() {
        if(classid!=null&& !StringUtils.isBlank(classid)){
            return InfoUtil.getClassName(classid);
        }
        return null;
    }

    public String getMajorName() {
        if(majorid!=null&& !StringUtils.isBlank(majorid)){
            return InfoUtil.getMajorName(majorid);
        }
        return null;
    }

    public String getNativeProvinceName() {
        if(nativeprovince!=null&& !StringUtils.isBlank(nativeprovince)){
            return InfoUtil.getNativeProvinceName(nativeprovince);
        }
        return null;
    }

    public String getNationName() {
        if(nation!=null&& !StringUtils.isBlank(nation)){
            return InfoUtil.getNationName(nation);
        }
        return null;
    }

    public String getPoliticsName() {
        if(politics!=null&& !StringUtils.isBlank(politics) ){
            return politics;
        }
        return null;
    }

    public String getClassPositionName() {
        if(classposition!=null&& !StringUtils.isBlank(classposition)){
            return classposition;
        }
        return null;
    }

    public String getUnionPositionName() {
        if(unionposition!=null&& !StringUtils.isBlank(unionposition)){
            return unionposition;
        }
        return null;
    }

    public String getNativeCityName() {
        if(nativecity!=null&& !StringUtils.isBlank(nativecity)){
            return InfoUtil.getNativeCityName(nativecity);
        }
        return null;
    }
}
